<template>
  <div></div>
</template>

<script>
export default {
  created() {
    this.setCookie();
  },
  methods: {
    openUrl() {
      if (this.$store.getters.loginStatu) {
        window.open("https://edu.kuke.com/", "_blank");
      } else {
        this.$store.commit("SET_DIALOGLOGIN", true);
      }
      this.$router.back(-1);
    },
    // 艺术鉴赏-单点登录 存cookie
    async setCookie() {
      let res = await this.$api.user.artAppreciation({});
      document.cookie = `_kuke_token=${res.source.artToken};path=/;domain=.kuke.com;max-age=Session;`;
      this.openUrl();
    },
  },
};
</script>

<style lang="scss" scoped></style>
